<template>
    <el-time-picker :value="time"
                format="HH:mm"
                type="timerange"
                @on-change="change"
                :clearable="false"
                :editable="false"/>
</template>

<script>
    export default {
        data() {
            return {
                // time: [],
            }
        }
        , props: {
            value: {
                type: String,
                default: ''
            }
        },
        model: {
            prop: 'value'
        },
        computed: {
            time() {
                return this.value.split('-');
            }
        },
        methods: {
            change(obj) {
                this.$emit('input', obj.join('-'));
            }
        }
    }
</script>

<style>

</style>
